using UnityEngine;
using System.Collections;

public class ApplicationMsgScript : MonoBehaviour {

	// Use this for initialization
	void Start () {
		DontDestroyOnLoad( gameObject );
		eventMsg[(int)AppState.State_Start] = new MyEventHandler( GameStart );
		eventMsg[(int)AppState.State_Start]( this, null );
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	#region state msg
	public enum AppState
	{
		State_Start,
		State_Menu,
		State_Play,
		State_End,
		State_Num,
	}
	
	public delegate void MyEventHandler(object sender, System.EventArgs e);
	
	public MyEventHandler[]	eventMsg = new MyEventHandler[(int)AppState.State_Num];
	
	public void GameStart( object sender, System.EventArgs e )
	{
		Application.LoadLevel("default");
	}

	
	#endregion
}
